<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script src="lib/vue.js"></script>
</head>
<body>
<div id="root">
  <child @click.native="fn"></child>
</div>
</body>
<script>
  new Vue({
     el: '#root',
     methods: {
       fn(){
         console.log("fn");
       }
     },
     components:{
       child:{
         template:(`
            <div  style="width:200px;height:200px;background:red;"></div>
         `)
       }
     }
  })
</script>
</html>